some fixes in the controller