Fix for the case where the ray points away from the AABB