fix a bug of location