proposed patch for CRM-13440
Merge pull request #1674 from systopia/CRM-13440

proposed patch for CRM-13440