Fixed bug in which item in current iteration is not removed from list. Fuck object-oriented programming.