fixed bugs so calculating attrPrefs works