Updated collision detection to get fix shaking.