fix analyzer warnings

fixes the analyser warnings