Fix problem in profile deletion