fix 500 on graph endpoint when there's no graph to display