fix double startup window bug