Should fix everything from #3 in smdFile