Fix error in controller