fixed some errors generated from rspec