diff --git a/bin/ngcp-fraud-auto-lock b/bin/ngcp-fraud-auto-lock
index 84fc99b..16eeaab 100755
--- a/bin/ngcp-fraud-auto-lock
+++ b/bin/ngcp-fraud-auto-lock
@@ -101,6 +101,7 @@ for my $e (values %{ $x }) {
                   FROM voip_subscribers s
              LEFT JOIN domains d ON d.id = s.domain_id
                  WHERE s.contract_id = ?
+                 AND s.status != 'terminated'
 !
 
 	my $cur = sprintf('%.2f', $e->{cash_balance_interval} / 100);
diff --git a/bin/ngcp-fraud-daily-lock b/bin/ngcp-fraud-daily-lock
index 51d1d92..f90402c 100755
--- a/bin/ngcp-fraud-daily-lock
+++ b/bin/ngcp-fraud-daily-lock
@@ -103,6 +103,7 @@ for my $e (values %{ $x }) {
                   FROM voip_subscribers s
              LEFT JOIN domains d ON d.id = s.domain_id
                  WHERE s.contract_id = ?
+                 AND s.status != 'terminated'
 !
 
  my $cur = sprintf('%.2f', $e->{daily_cost} / 100);