fixes #15 chunk count issue