Fix leak in FilterInternal