Simplify resize logic.