Correct issue with fragment being detached