fix resizing of graph