correct undefined execption in selectAll