Primefaces Organigram ordering

In Primefaces Organigram, it seems like it doesn’t follow the actual ordering to list the node. For example, I have total 4 nodes, which represent as below:

enter image description here

What I am expected is the Organigram will be listed as below:

enter image description here

But it listed like this instead:

enter image description here

What I have figure out is it always shift the leaf node (node without child) to the left. If I remove the node 4 from the list, it will back to normal ordering, which is node 2 at the left, and node 3 at the right. Is there any idea to overcome this problem?

This is my backing bean:

private AccountModel user;
private OrganigramNode root;

public void onLoad()
{
    user = accountService.findOne(SystemUtils.getCurrentUser().getId());

    if (user.getUpline() == null)
        root = new DefaultOrganigramNode("root", user, null);
    else
        root = new DefaultOrganigramNode("root", user.getUpline(), null);

    List<AccountModel> downlines = ((AccountModel) root.getData()).getDownline();

    for (AccountModel downline : downlines)
    {
        addDownline(root, downline);
    }
}

public void addDownline(OrganigramNode parent, AccountModel target)
{
    OrganigramNode child = new DefaultOrganigramNode(type, target, parent);
    if (!target.getDownline().isEmpty())
    {
        for (AccountModel downline : target.getDownline())
        {
            addDownline(child, downline);
        }
    }
}

Primefaces Organigram ordering