Fixes database error but when deleting user