Tuning the resize logic.