Fixed a delete bug. Ref #1.