fix read cookie