fix double join bug.