fixed exception when switching to graph screen