Misc changes for buffers.pl issues