small fix to clear the buffers