Fixed bug in parsing cookie header