Fixed code analysis warnings.