Update apply_profile.code