Modify run_ap()