Added detection for location services