fix an issue for main activity