tables relations problem fixed