bugfix for delete()