fixed a bug, forgetting to set the num loaded, other fixes