remove that crude hack that i used to prevent to insert nodes twice by
insted using the afterstate.