bugfix collision detection