Added logic to check if gps is disabled