tables relations fixed