fixed some dag bugs