Polish changes from PR #2712