To avoid getting an error, first check if an element is in a set before removing it, like with "History" here.

Make sure to pick if followed by "History" and then in, classes:.