Fixed false positive ray tracing in the direction opposite to the ray.