fix drawing issues when unminimized