various fixes for GHC 7.4.1 etc.
more fixes for GHC 7.4.1