fixed shadows bug, crashing bug