Fix wrong cookie header sent from server