Corrects bug on shadow movement when user resizes window