fixed bug
better macro error reporting