quick fix to the window resize code