Another buffer bug fix