fixed lazy functions and macros scoping bug.