fixed to compile under ghc 7.8