make terminate working