Fixed bug in smf.