fixed crash on small windows