better behaviour on windows resize