Fixed bug in plots