fix CORE-1230

Hi Nathan,

this is a fix for CORE-1230 as suggested by the reporter of that issue.

Kind regards,
Norman