Fixed bug with words index in output XML