Merge "Fix execute_script method to avoid infinite wait."