fixed error with graph scaling