Fixed startup and charset issues on Windows