fixed dialogue bug