Various Windows fixes