fix main loop macro Issue #1