fixed to compile on ghc 7.6.3