cleanup asMatrix*