correctly handling resize window