fix join npe issue