added a macro to try to deal with template instantiation nastiness