Only resize when needed