fixes for windows compilation