add windows correct main loop
Merge branch 'bug_18' into develop