bug fixes for windows