Fixed code analysis issues