add one case when lastchunk is encountered