Fix hopcount properly