Fixed removing from iterating list problem