Add foreign key tests
Minor FK fix