Fixes for issue #2391