Reordering conditional.
Fixing delete_count logic.