fix #2279
Merge pull request #2983 from mattaylor/patch-3

fix #2279