fixes graph that is produced and avoids bad js names