repair references of object template