Improve deletion behaviour. Fixes #59.