Fix fail on resize