fixed IndexOutOfBound errors for first words in buffers