improved expect-continue management