Fixed issue with empty graph being created