Automagically resize graph, some fixes