fixed dumb termination bug