Fix bug: update cell iterators when size of grid is changed.

The bug appeared when the grid size was changed during simulation
in the interactive version.