failsafe version of f9eaa29b
Merge pull request #48 from mfournier/really-fix-delete-error

failsafe version of f9eaa29b