Fix NEAR bug