Added buggy collision detection