fixing bug that was causing the app to crash if the phone's location was disabled