Fix traversing graph and fill canvas