Fix the bug that was causing graphs not to be drawn