BugFix: called main instead of main-loop