Fix bugs in haddock comments