simplify client
Fix undefined variable in thread client route