fix saving bundle when view is destroyed