threads example fixes