fix bug circuit