fix for Issue #357

should work with current and future ghc