fix total_chunks