Fixed bug with empty words array.