simplify rerender on resize, fix #1