Fixed code analysis warnings