Fixed small issue with buffer generation.