Backport to API 10 - not all features now - but it works