bug in controller