fix windows compatibility issue & add semicolon to item macro