fixed issues in PR #3669