Fix some tab bugs