fixes broken script dialog and tree sync