Fixes attribute index