Resize window to fix size when maximize failed.