fix to make it terminate when signalled in passive/silent modes.