fixes in plot functions