fix logic in negative test