Fixed prev_word array issue