add back and reset, fix terminate and cycle bug