fixt collision detection bug.