Fix wrong reference relations.