fix bug: location unavailable when GPS is switched on