Support commit #1

Fixed a possible deadlock.