Fix bug in getting user