fix haddock doc gen bug