Fixed bug in user deletion function