Bugfix for location handling