Fixed issues from PR #3497