Refers #123 -- Fix reference to foreign keys