Polish changes from PR #2830