code analysis fixes