Improved parsing of graph arguments.