fix for CRM-14397

Signed-off-by: Jaap Jansma <info@edeveloper.nl>
Merge pull request #2779 from jaapjansma/CRM-14397

fix for CRM-14397