Fixing KeyValueSchema.toBytes method signature