fixes for windows compatibility