fixed an issue with cookie