Fix to avoid empty locations fail with the map