add guard for macro expansion