UI tweaks on Windows
fixed thread termination bug on Windows