fixes autoHeight bug on resize