Fix StateLoss exception

that happened on dual panes because of commiting a fragment transaction as
a result of onActivityResult().
See
http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html
for more explanation.