Correcting table join