fix the activity switching problem if the activity is already started