A few bug fixes for delete
Merge pull request #393 from benrudolph/delete-fix

A few bug fixes for delete