fixed bug with shadow tracing