fix another bug in plot