found an error with foraign keys getting screwed up.