Restore #317 which was accidentally undone in the 0.8 rewrite