adding hack from Mark Moriarty