fix join nil bug