Fixes for issue 6726