fixed issues from static code analysis