Improved window resize handeling Code fix recommendation by Mauricio Scotton