bugfix for 'FOREIGN KEY reference'