Fixed result unpacking and graph edge creation