bug fixes for windows issues