Fixed chunk server index in write_chunks