keep proper window size when play