added early termination of run_de