clear bugs in plot