Fix initialization bug.
Better stability on resize.