Fixed bug in controller template