fix for bug in cookie storage