Coverity 201306

My fixes following Coverity analysis.