update input, resolve bug of type