Put some asserts in Circuit to avoid these mistakes.