fixed a exit(0) bug