Fixed some issues with expanding/collapsing table view.