add reset when the window is resized