fixed json parsing in getlocation method