can see legend in plot, fixed potential infinity loop