Fix resize issue