Added clear of buffer
Minor improves