fix code Static Analysis Warnings