Bug fix to applying xml comments