robustify kernel macros