added pre-delete hook that removes db connections for deleting container