Fixed scope in $word_array