fix error in controller