Call clear() after buffer loop (this should fix a glitch with redrawing interface).