imporved cookie support