Added section_list length check in to_dict