Fixed thresholding on main window.