Small improvement to the SQL deleter code