Fix bug that crashed app on back