fixed bug in persistent cookies