Windows run time fixes

This fixes multiple problems preventing the windows domain-server and assignment-clients from running.