Fixed issues in controller and view
Merge pull request #53 from rehoutm/errors-fix

Fixed issues in controller and view