fix `_pruneexcept` function so that `fix_parameters` works