scripts/dictionary: fix fatal typo
modules/buffer: partial rewrite so it actually works