fix pig scripts