fix windows compile errors