fixup buffer locals