properly include macros, fix error rendering