Fixed issues with how I was handling variables