fixed a bug with tab directive