fix for aps.size()<3