oops, the code was "if direct && not present" and I removed the direct which made the wrong path be taken.