Fix issues for rspec tests.