Minor fixes in graph drawing code