fix tree addAfter/Before