fixed faulty logic in previous warning code