More coverity stuff
Fixing more coverage things
Merge branch 'master' into tests