bugfix delete and logging