patched work on CRM-12729
Merge pull request #32 from kurund/CRM-12729

patched work on CRM-12729