fix problems in ray level