Fix bug for profile not saving.