Applied Dmitry's patch for ticket #238 to liborigin library.
Authored by: hpcoder 2014-07-22
Parent: [r1443]
Child: [r1445]