finalize last chunk properly. Issue with recycled frames