cleanup in AstBuilder
fixed id comparison