fix merge and macros