Fix early-ray termination