Fixed nullpointer when no GPS or WIFI