Synchronise with the 0.9.6 branch.