fix the join table bug