batch seldetor fix