Changing block to two dimension index and fixing read_cell bug