Added sketch corrupt function