tables join fix