fixed #9
Code analysis issues
Fixed #7