Fixed some erroe clang static analyser showed.