fix sphere-cube collisions at edges