fix java.lang.IllegalStateException

fix java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState: use dismissAllowingStateLoss since we don't need to keep the states.