Work around windows bugs