Fix deadlock when unmanaging entities