Whats wrong with the last one condition? Why java doesnt remove every element?