Bug fix in database data driven cleanUnusedRows method