Fix out-of-bounds graphs