Fix bug in checkUser utility