fixed an exception when geo location is enabled and tested on localhost