Merge changes to support r509 0.10