Fixed collision detection for objects inside each other.