fix join bug