When there was no terminate function defined in the library the exported variables would not update. This fixes that.