Fixed bug in controller.rb