Fixing up location dialog to wait for the movement to finish.