Fixed cookie storage problem