fix cleanup batch query mistake