Add batch filter and prevent gui crash