calculation written bytes fixed
Merge pull request #48 from fbergkemper/master

written bytes fixed