fixed matrix equiv attach bug