JAL-345 invert logic is not quite right - REVISE THIS!