Fix bug in checked; Refactor updateusers