Thread: fix #8550, #8671, #8672.

svn path=; revision=84717