Fix the foreign key reference to point to the table rather than the object

Thanks @puiterwijk for finding it out