Added proper define handling