print foreign key correctly