fix for PR 2166