Bug#4827 Fix error when delete profile.