Fix cookie escaping bug