Delay  clear buffer on loading

#1415 Describes the buffers not being cleared, this fixes that issue.
reformatted to change spaces for tabs.