Use wait_for_ajax to hopefully make less frail.