Merge pull request #1 from laurencelundblade/betterusefulbuf

Important fix for bug introduced in some minor recent changes from th…