fix foreign key for topic