FIX issue #3: adding foreign key constrains to link tables