fixed minor problem in controller