fixed collisions w/window edges