+ fix flaws found with code analyzer tool