Fix: Unsubscribe while not holding a lock.

For Issue #577