applied patch for CRM-13357
Merge pull request #1616 from yashodha/CRM-13357

applied patch for CRM-13357