Open weather map fixes

added autodetection based on geolocation and fixed segmentation fault