Fixed a problem in the cell image generator