update according to static analysis
Merge pull request #328 from nem0/static_analysis

update according to static analysis