Fix a delete item related bug

Fixes #32