Fixed bug with crash when location is not loaded