Fixed some errors in the macros