Fixed the total being wrong on graphs