bugfix in force_canonical cookie code