fixed some windows bugs