bugs in plot fixed