more tweaks to make complex macros run on server