Fixed some bugs with tab stacks.