fixed rayp problem