ensuring the buffer is reset