Minor changes in tab handling