Terminiation bug fixed