Fixed distance bug.