Fixes to work with latest trunk.