added in controller and rspec tests for issue #611