fixing the controller as well