Fixed error in add_circuit