Refactor source and avoid error on resume activity