Try to avoid errors when disabling gps