Fixed #869: thread test failing