Fixed coverity issues 1082470 thru 1082475
Merge pull request #997 from cmouse/coverity-1082470-1082475

Fixed coverity issues 1082470 thru 1082475