Fixes check for delete. Fixes #30 #32