fixing Issue #18 : problem with last chunk not being returned if it is partially full