fixed join bug