Fixing additional log window problems and removing console window under windows.