fix total length