fixed attach_run_wait type