Fix race in bufferedBytes access
Merge pull request #100 from dolzenko/fix-race

Fix race in bufferedBytes access