fix the issue about save the data when click back button