fix dg scripts