#24 fixed buffer positioning

This fixes #24 when a character event is longer than than the buffer