fixed #2 Wrap define in function.