fix wrong use of taskjobs table instead of rules table