#275 fixing error in the controller