Some Windows fixes