fixed program exit some more