Fixed the set_cell function