Fixed bug where loop variable was reused in macro inside of a loop...
stupid macros...