Fixed bug with removeAll function.