fix clearing from undobuffer