Fix NaN in distance estimate per #43