fix windows bugs