fix dirty tree