fixed last graph creation