Changed order of cell type conditions because a bool is an instance of int.