update internal/constructor: clean buffer first