bugfixes for windows