Fixed completed_pieces to mean sequential pieces from the start