maintain child order when changing node type