core and haskell fixes