various tweaks to let haddock work