Fix random generator for repeatable graphs