fixTheLocationFunction