Minor bug fix for macro cleanup