Distance calculation fix?