replaced broken cookie handling with local option #363