Fixed bug in updating ap_load