fix haddock crash