fixed a typo and the wording of an error message in element removal