fixed bug and fixed specs (did not recognize the bug)