fixes to smat