fixed code analysis violation
Merge pull request #677 from adamralph/code-analysis

fixed code analysis violation