Fix foreign key error in unit tests #43