Simplify prune plugins and fix array difference error.