Windows compile bugfixes due to latest changes