fixes StackOverflowError when cannot resolve macro
fixes error message for function invoke