Fix key length bounds.