fixed app crash on tabs when you rotate the screen