fix restore from minimized. Closes #2574