Termination bug fixed