Minor improvements to macros