fix a cookie parseing bug