Fix some other scan coverity reports

Here are fixes for some other scan coverity reports