forgot to recurse If elements when generating macros