Bugs in plots fixed

Bugs in plots fixed