Various fixed to work with Windows