Minor fixes for better Windows compatibility