fix coverity issues 966593-966596

PR#3340