dumb typo fix and buffer restoration attempt