diff --git a/src/sacctmgr/association_functions.c b/src/sacctmgr/association_functions.c
index 9124677064290468808c72e6eafcb7be3fe66fad..22923526c04fd82c48bc7d8b81978e7dfcea1fc2 100644
--- a/src/sacctmgr/association_functions.c
+++ b/src/sacctmgr/association_functions.c
@@ -201,10 +201,10 @@ static int _sort_childern_list(local_assoc_t *local_a, local_assoc_t *local_b)
 	/* check to see if this is a user association or an account.
 	 * We want the accounts at the bottom 
 	 */
-	if(list_count(local_a->childern) && !list_count(local_b->childern))
-		return 1;
-	else if(!list_count(local_a->childern) && list_count(local_b->childern))
+	if(local_a->assoc->user && !local_b->assoc->user)
 		return -1;
+	else if(!local_a->assoc->user && local_b->assoc->user)
+		return 1;
 
 	diff = strcmp(local_a->sort_name, local_b->sort_name);
 	if (diff < 0)