fixed dialogue[i] undefined issue