fix bug: restoreDefault

buffer must be memset before set new value.