Fix cookie method