fixed bug in plane wave refraction