Fix broken --loadmain
Merge pull request #9 from eush77/loadmain-fix

Fix broken --loadmain