Fix bug when there are no locations