fix bug with opening tabs