fix _exitfunc to actually exit