fix scroll on resize bug