Correcting bug in which children was not a list.