rspec and fix bug