Add wait checks in queue_dh_params