Addressed Coverity issues 711911, 1102823