Fixed problems with graph constructor

-- Maybe other minor changes