fixing few code analyzis issues