Fix cursor advancement.

See #13.