- a few bugfixes related to coverity scan