Fixed issue in controller