Another bugfix for collision detection