fix expandable cell logic