fixed nested macro bug