Fixed some more stuff relating to section generation. Now the spin button works completely and the dialog goes away when you press okay.