Fixed another issue with buffer