fix input cookie bug