fixing singularizeChildren functionality