Fixed some bugs at importFrom method in Graph class