Graph building fix