patched CRM-13291
Merge pull request #1535 from yashodha/CRM-13291

patched CRM-13291