Added missing builder.endObject calls