Fix bug in deleting elements, update sample.html.