really fix join
correctly set relnum