fix bug that made some windows doesn't appear