plotting bug fixed