fixed ray measurement bug