Fixing attribute cache bug