fixed the user deletion function