Crop with key : improve deal with ratio constraint