Fixed static analysis warnings.