fix out of range errors caused by changes to graphHandler