bugfix: make sure the location is pulled from the cookie properly