partial fix for issue #2261