fixed graph resizing bug