Solved bugs in CollisionSystem.

Before, some collisions were not detected.