fixed rspec bugs