fixed relationship error in db