Fixed get_ap