added inefficient but correct sorting after update with arrayChildId