fix compute_aps