Merge of siddhant3s's strict resize option.