Fix graph generation on Heroku

Thanks @wei2912 for pointing out a mistake.