Finally found the bug in ray tracing!!!!