Add code to fix rspec errors