Fix sync mode change and modified state in editor