Fix xml document missing some code .Fixes #919

The title is say so.