Fixed thread-locking exception.