fixed weird bug in tests which allowed them to pass but for the wrong reasons