fix eraseCookie