fix UI window resize bug