Fixed bug of adding hooks to haskell mode.