fixed different behaviour between ghc-7.4.2 and ghc-7.6.2