fix unit creation macro to read name of unit