work tree check bug fix