Fixed a bug in the OTF wrapper