Fix bond deletion and DB cleanup