matrix and attribute fix