Protect against unbalanced popActivity calls