segfault correction when deleting plot, and changed shape default values