Fix preview bug with tab