fixed formula for ghc v7.8.1