Fixed query in calc_ap_load.py