Adding proper suport of collisions.