Small fixes of optimal fitting window.