Correct inhomogeneous overlap formula