try to fix the earlier problem by explicit rray conversion