Fixed decoding of cookies