Fixed coverity issue.
Coverity 711708, first instance.
Coverity 711708, second instance.
Coverity: 711873