fixed some rspec bugs