Fix generate bugs in Windwoas