keep sizes within bounds