#10 Improved behaviour on hard and soft detach operations to avoid deadlocks and give better logging feedback