fix some bug in Array.prune