fix bug of destroying cookies after closing web browsers