avoid error when trying to delete non-existing array element
Merge pull request #46 from mfournier/fix-delete-error

avoid error when trying to delete non-existing array element