fix a cookie validation exception bug