Modified the collision checking a bit.