fixing issue around xml metadata generation when solving root elements