Fixed Coverity Issues