Added feature of modifying the selected profile.