Updated to work against latest upstream unstable branch.