Add max length for keys