fixing preloadfunc closes #115