Fixed cache bug, better tree sync and other GUI-sync-issues