fixing show window bug