Replace deprecated macros