fix empty cookie issue