fix bug when there is only one as well as no section exist, then crash