some fixes for static params usage in macros