fixing minor bugsin rspec testing