minor windows-provoked bug fixes