Fixed variable assignment in controller