Fixed so that it compiles with ghc 7.8