Bug fixes when location tracking ends.