Collision detection functional, but some weird inaccuracies