second try for changing maximum length for keys to be backwards compatible