Fix crashes in builder.