fix logic in MainActivityTab.java