Fixed comparison operator in controller
Changed conditions to common calls