# you can fix it by replacing

# "${!magic}"

# with (prints "$var" and gets the "value")

"$(eval printf "%s" "\$$magic")"
