rspec and functional tests fixed