Fix fetchHeadEntriesWithError: