Fix removeAll function.