Fixed removeAll function