fixed unnecessary buffer creation
Merge pull request #269 from lynnard/master

fixed unnecessary buffer creation