Coverity issue: 1197640
Coverity issue: 711827
Coverity: 711834, 711833, 711832
Coverity: 711838
Coverity: 1198195
Coverity 1152156