Stopping error accessing resources when Activity has died.