fixed graph2d not updating on animation correctly