Fixes issue where I wasnt scoping the controller vars properly