Remove problematic if statement in prune func