Better delete check for issue #24