Fix pig scripts