Fixes part 7 of #4
Should fix everything from #3 in smdFile
Merge pull request #7 from TruePikachu/fix-#1

Fix #1