fixed an issue when converting distance because of the unit