Fixed an issue with removing the pie chart when the close button was

clicked.