Minor modification to script fixing typo and added macros