Fix cursor buffer. Fixes #18.