fixed collision detection broken in last refactor