Fixed $DB calls that should have used array parameters