Fix 'user not found' and 'type error'