Fix ClearBuffer and GetEnumerator's usage of toBufferIndex. Fixes #4.