fixed the graph sorting on the application