Fixed variable substitution

Made a n00beh mistake, fixed it