Avoiding crash when GPS not enabled.
Removing migrated code.