fix build error and doc warnings.