fixed rendering bugs with small number of cells