Bugfix for delete