bug-fixes in macros