fix 2D graph object null error.