fixed some bugs, ly dialog mode