Repair environment constructor calls