fixed a bug that button does not disappear