Fix an error with raytracing