Add a min-max action to handle keysize