fixed apriori related bugs