Fix focus issue when closing splits. Ref T477
fix tab counter glitch. Closes T477