Fixed bugs in the spec method