downgrade to the last working version of pkg

1.3.5.1 is known to be broken. revert this commit when merging the
latest pkg from master.