fix a bug that skip tabs