Fix some static analysis warnings.