fix wp distance error.