Added a buggy collision detection, needs fixing