Fix invalid listname and listsize not handled correctly in set_size