be more careful with min vs max when resizing