Move tab rewriting from onCreate to onResume