Fixes for issue #2125