debugging the switching on and off of location in settings