small fixes for ghc 7.8