fix a few issues with mapping macros