Fixed RSpec bugs