Updatelist should not cache length value in for-loop because number of element can be changed